/** When your routing table is too long, you can split it into small modules **/
import Layout from '@/layout';

// 路由模块化：活动管理中心路由
const BusinessRoutes = [
  {
    hidden: true,
    path: '/separate',
    component: Layout,
    redirect: '/business',
    meta: {
      title: '分账管理',
      icon: 'tab'
    },
    children: [
      {
        path: 'business',
        component: () => import('@/views/separate-management/business'),
        name: 'SeparateBusiness',
        meta: { title: '业务分账', icon: 'tab', affix: false }
      },
      {
        path: 'withdrawal',
        component: () => import('@/views/separate-management/withdrawal'),
        name: 'SeparateWithdrawal',
        meta: { title: '提现管理', icon: 'tab', affix: false }
      },
      {
        path: 'payable',
        component: () => import('@/views/separate-management/payable'),
        name: 'SeparatePayable',
        meta: { title: '应付账单', icon: 'tab', affix: false }
      },
      {
        path: 'records',
        component: () => import('@/views/separate-management/records'),
        name: 'SeparateRecords',
        meta: { title: '付款记录', icon: 'tab', affix: false }
      }
    ]
  },
  // 分销市场
  {
    hidden: true,
    path: '/distribution', 
    name: 'DistributionMarket',
    component: () => import('@/views/distribution/index.vue'),
    meta: {
      title: '分销市场',
      icon: 'el-icon-s-help'
    }
  },
  // 分销里我的供货
  {
    hidden: true,
    path: '/distribution',
    component: Layout,
    meta: {
      title: '分销市场',
      icon: 'el-icon-s-help'
    },
    children: [
      {
        path: 'adddistri', 
        name: 'DistributionMySupply',  
        component: () => import('@/views/distribution/adddistri.vue'),
        meta: {
          title: '我的供货',
          icon: 'el-icon-s-help',
          activeMenu: '/distribution',
          isNotCheckToken: true
        }
      }
    ]
  },
  { //分销供应商提交资质
    hidden: true,
    path: '/supplier',
    name: 'DistributionSupplier',
    component: () => import('@/views/distribution/supplier.vue'),
    meta: {
      title: '提交资质',
      icon: 'el-icon-s-help',
      isNotCheckToken: true
    }
  }
];

export default BusinessRoutes;
